const http = uni.$u.http

// 根据key获取业务参数配置详细信息
export const getByKeyApi = (configKey) => http.get('/business/business/getByKey', { params: { configKey } })
//业务参数配置详细信息
export const getBusinessApi = (goodsId) => http.get('/business/business/' + goodsId)
// 查询地区列表
export const getAreaListApi = () => http.get('/system/area/list')
//查询信息列表
export const getInformationListApi = (query) => http.get('/business/information/list', { params: query })
// export const getUserListApi = (query) => http.get('/business/user/getOrphanList', { params: query })
//申请志愿者
export const getVolunteerApi = (data) => http.post('/business/volunteer', data)
//孤儿列表
export const getOrphanListApi = (query) => http.get('/business/user/getOrphanList', { params: query })
//孤儿列表
export const addAssistedUserIdApi = (query) => http.put('/business/user/addAssistedUserId', query)
//孤儿详情
export const getOrphanInfoApi = (goodsId) => http.get('/business/orphan/' + goodsId)
//谁帮扶我
export const getHelperuUserIdApi = (query) => http.get('/business/user/getHelperuUserId', { params: query })
//我帮扶谁
export const getAssistedUserIdApi = (query) => http.get('/business/user/getAssistedUserId', { params: query })
//新增信息
export const addInformationApi = (data) => http.post('/business/information', data)
//新增孤儿
export const addOrphanApi = (data) => http.post('/business/orphan', data)
//新增志愿者
export const addVolunteerApi = (data) => http.post('/business/volunteer', data)
//新增投诉
export const addComplaintApi = (data) => http.post('/business/complaint', data)
//新增用户收藏
export const addCollectApi = (query) => http.post('/business/collect', query)
//删除用户收藏
export const delCollectApi = (query) => http.get('/business/collect/delete',{ params: query })
//查询用户收藏列表
export const getCollectListApi = (query) => http.get('/business/collect/list', { params: query })
//我的发布列表
export const getInformationList2Api = (query) => http.get('/business/information/list2', { params: query })
//信息详情
export const getListInfoApi = (query) => http.get('/business/information/getInfoById',{ params: query })
//信息详情
export const putUserApi = (query) => http.put('/business/user',query)
//查看手机号
export const viewPhoneApi = (query) => http.get('/business/user/viewPhone',{ params: query })

//团队列表
export const getMyTeamApi = (query) => http.get('/business/vip/getMyTeam', { params: query })
//团队下级列表
export const getTeamApi = (query) => http.get('/business/vip/getTeam', { params: query })
//获取地址
export const getAddressApi = (query) => http.get('/business/vip/getAddress', { params: query })
// 绑定邀请人
export const bindSuperiorApi = (userId) => http.get('/business/vip/bindSuperior', { params: { userId }, custom: { showSuccess: false, showError: false } });


export const topUpApi = (data) => http.post('/pay/topUp', data)

export const getMyInfoApi = () => http.get('/business/user/getMyInfo')

// 修改微信昵称图像
export const updateWxInfo = (nickName, avatar) => http.post('/business/vip/updateWxInfo', {}, { params: { nickName, avatar }, custom: { successMsg: "修改成功" } });


// 提现
export const auditApi = (data) => http.post('/business/audit', data, { custom: { showSuccess: true, successMsg: "操作成功" } })
//流水
export const getFlowingApi = (query) => http.get('/business/flowing/list', { params: query })
export const getAuditListApi = (query) => http.get('/business/audit/list', { params: query })


